package line;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import DataStorage.InformationLigneDAOHibernate;
import HibernateSQLite.java.model.InformationLigne;

import com.mxgraph.util.mxResources;

public class DeleteLine extends DialogLineChooser{
	private static final long serialVersionUID = 1L;

	public DeleteLine(){
		setTitle(mxResources.get("removeLine"));
		setValidateButton(mxResources.get("remove"));
		setValidateListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent evt) {
				System.out.println("Supprimer");
				InformationLigneDAOHibernate infoDAO = new InformationLigneDAOHibernate();
				infoDAO.deleteRelatedInformationLigne(lineChooser.getInfoLigneId());
				DeleteLine.this.dispose();
			}
		});
	}

	public static void main(String[] args){
		new DeleteLine();
	}
}
